import React from 'react';

import {
  count,
  songName,
  position,
  add,
  changeDirection,
} from './utils/utils.js';

// 导入 Person 类型
// import { Person } from './test';
type Person = {
  name: string;
  age: number;
};

import logo from './logo.svg';
import './App.css';

function App() {
  console.log(changeDirection('left'));

  const person: Person = {
    name: 'Jack',
    age: 18,
  };
  //
  const strArray = ['a', 'b', 'c'];
  // 鼠标放在 forEach 上查看类型
  strArray.forEach;
  window.addEventListener('scroll', () => console.log());

  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          Edit <code>src/App.tsx</code> and save to reload.
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
      </header>
    </div>
  );
}

export default App;
